# Insert a numeric variable

Use the Numeric Variable dialog box to insert a numeric variable in a text box. The numeric variable can be a tag name or placeholder that will provide a value that will change dynamically at run time, or it can be a literal number that will display as entered.

There are many cases where you might want to show process data within a fixed string on an object. For example, you may want to show the current value of a setpoint in the caption of a numeric input enable button that edits the setpoint value. To do this, embed the setpoint's data item or tag in the caption property.

Tip: | Embedded variables are case sensitive, and must be in the proper format and syntax to work. If you make a mistake, your variable will be treated as a piece of text. Therefore, do not attempt to edit embedded variables manually. Use the Insert Variable and Edit variable dialog boxes to avoid problems.

## To set up a numeric variable

1. In the Caption box in a graphic object’s Properties dialog box, or in the Message column of the Local Messages, Information Messages, or Alarm Setup editor, click Insert Variable.
2. Click Numeric.
3. Specify the options in the dialog box that opens and click OK.

## To edit a numeric variable

1. Double-click the numeric variable in the text box, or right-click and select Edit Variable.
2. In the Numeric Variable dialog box, make the required changes and click OK.

## Options

- Tag

  Choose this option to use a tag as the source of the numeric variable. Type the name of an analog or digital tag, or type a tag placeholder.

  To open the Tag Browser and select a tag, click the Browse button.

- Literal number

  Choose this option to enter a literal number string as the numeric variable. This choice places the character 'L' (for Literal) at the beginning of the embedded variable, and prevents the system from performing a tag read for this variable.

  Tip: | Use the Literal number option if the number you want to show requires decimal places or other special formatting. Otherwise, you can include numbers in the Literal string option.

- Number of digits

  Select the maximum number of digits to display, up to 17 digits. The decimal point and minus sign each count as a digit.

- Decimal places

  Select the number of digits to appear after the decimal point.

- Fill left with

  Select a character to fill the left of the display with if the value at the data source contains fewer than the maximum number of digits. If you don’t want to use a fill character, select None.

## See also

About embedded variables

Numeric variable syntax

Insert a string variable

Insert a time/date variable